//
//  LCMWAnnotationView.swift
//  mggz
//
//  Created by QinWei on 2018/1/13.
//  Copyright © 2018年 爱丽丝的梦境. All rights reserved.
//

import UIKit

class LCMWAnnotationView: BMKPinAnnotationView {
   // var calloutView:LCCalloutView?
    var isPop:Bool?
    override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
        let view = super.hitTest(point, with: event)
//        if view == nil {
//           // let tempoint = self.calloutView?.checkButton.convert(point, from: self)
//
//        }
        return view
    }
    override init!(annotation: BMKAnnotation!, reuseIdentifier: String!) {
        super.init(annotation: annotation, reuseIdentifier: reuseIdentifier)
        self.isPop = false
        
       // self.setUpCalloutView()
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
//        if self.isSelected == selected {
//            return
//        }
//        if selected {
//            self.setUpCalloutView()
//        }
        
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
       // self.calloutView?.frame = CGRect(x: -(220-self.frame.size.width)*0.5, y: -170, width: 220, height: 160)
    }
//    func setUpCalloutView(){
//        if self.calloutView == nil{
//          self.calloutView = LCCalloutView.init(frame: CGRect(x: 0, y: 0, width: 220, height: 160))
//            self.addSubview(self.calloutView!)
//        }
//    }
}














